// 创建一个路由器，并暴露出去

// 第一步：引入createRouter
import { createRouter, createWebHistory } from 'vue-router'
// 引入一个一个可能要呈现组件
import Father from '@/pages/01_props/Father.vue'
import Event from '@/pages/02_custom-event/Father.vue'
import Mitt from '@/pages/03_mitt/Father.vue'
import VModel from '@/pages/04_v-model/Father.vue'
import Sattrs from '@/pages/05_$attrs/Father.vue'
import RefParent from '@/pages/06_$refs_$parent/Father.vue'
import ProvideInject from '@/pages/07_provide_inject/Father.vue'
import Pinia from '@/pages/08_pinia/Father.vue'
import Slot from '@/pages/09_slot/Father.vue'
import DomianSlot from '@/pages/09_slot_作用域插槽/Father.vue'

// 第二步：创建路由器
const router = createRouter({
  history: createWebHistory(), //路由器的工作模式（稍后讲解）
  routes: [
    {
      path: '/props',
      component: Father,
    },
    {
      path: '/selfDefineEvent',
      component: Event,
    },
    {
      path: '/mitt',
      component: Mitt,
    },
    {
      path: '/vModel',
      component: VModel,
    },
    {
      path: '/$attrs',
      component: Sattrs,
    },
    {
      path: '/$RefParent',
      component: RefParent,
    },
    {
      path: '/provide-inject',
      component: ProvideInject,
    },
    {
      path: '/pinia',
      component: Pinia,
    },
    {
      path: '/slot',
      component: Slot,
    },
    {
      path: '/domianSlot',
      component: DomianSlot,
    },
  ],
})

export default router
